package com.action;

import java.util.List;

/**
 * Created by lirance on 16/4/13.
 */
public class searchUserAction extends BaseAction {
    private List userlist;
    int uid;
    String uip;

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUip() {
        return uip;
    }

    public void setUip(String uip) {
        this.uip = uip;
    }

    public List getUserlist() {
        return userlist;
    }

    public void setUserlist(List userlist) {
        this.userlist = userlist;
    }

    @Override
    public String execute() throws Exception {
        try {
            if (uid != 0) {
                this.setUserlist(this.getAllService().getGetUsersService().getEntitiesbyID(uid));
            } else
                this.setUserlist(this.getAllService().getGetUsersService().getEntitiesbyIp(uip));
        } catch (Exception e) {

        }

        return SUCCESS;
    }
}
